home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / fortran / fatdos.zip / FATD2.DOC < prev    next >
Text File  |  1988-04-15  |  9KB  |  395 lines

  1.     FAT-DOS 1.0            MKDIR            PAGE F-1
  2.     
  3.     
  4.     MKDIR - This function creates a new sub-directory. You pass it an
  5.            asciiz string containing the name, and check Ier on return.
  6.  
  7.     integer*2 Ier
  8.     character*n DirName
  9.         call MkDir(DirName,Ier)
  10.     
  11.     call with:
  12.     DirName    = Directory name and path, i.e. 'C:\Mysub'//char(0)
  13.     Ier    = error code
  14.               0-normal return
  15.           3-path not found
  16.           5-access denied
  17.         
  18.  
  19.     RMDIR - This function deletes a subdirectory. The function will not 
  20.            work if you try to delete the current subdirectory, or if the sub-
  21.        directory still contains files, or any part of the pathname does
  22.        not exist.
  23.  
  24.     integer*2 Ier
  25.     character*n DirName
  26.     call RmDir(DirName,Ier)
  27.     
  28.     call with:
  29.     DirName    = Subdirectory path and name, i.e. 'D:\Work\Mysub'//char(0)
  30.     
  31.     returns:
  32.     Ier    = error code
  33.               0-normal return
  34.           3-path no found
  35.           5-access denied
  36.           6-current directory
  37.          16-current directory
  38.  
  39.  
  40.     SETDIR - This function makes the specified directory the current
  41.             working directory. The directory name is passed as a 
  42.         null terminated string(asciiz string). Its usually wise
  43.         to use GetDir() first, to save the original directory
  44.         before changing it, in case you wish to go back to your
  45.         original directory.
  46.         
  47.     integer*2 Ier
  48.     character*n DirName
  49.     call SetDir(DirName,Ier)
  50.     
  51.     call with:
  52.     DirName    = Directory name to make current, i.e. 'C:\Work'//char(0)
  53.  
  54.     returns:
  55.     Ier    = error code
  56.               0-function worked
  57.           3-path not found
  58.     FAT-DOS 1.0            GETDIR            PAGE F-2
  59.  
  60.     GETDIR - This function returns an ascii string defining the full 
  61.             path of the current directory on the drive requested. The 
  62.         DirName string must be 64 bytes long. 
  63.         
  64.     integer*2 Drive,Ier
  65.     character*64 DirName
  66.     call GetDir(Drive,DirName,Ier)
  67.     
  68.     call with:
  69.     Drive    = Drive number to return current directory on.
  70.               0-default, or current disk drive.
  71.           1-A,2-B,3-C,4-D,5-E
  72.     returns:
  73.     DirName    = current working directory 
  74.     Ier    = error code
  75.           0 - function worked
  76.           Non-zero - drive specified is invalid
  77.     
  78.           
  79.     FAT-DOS 1.0            COMLIN            PAGE G-1
  80.  
  81.  
  82.     COMLIN - Copy the command line tail to a string.
  83.    
  84.     integer*2 String*127
  85.     call ComLin(String)
  86.     
  87.     call with:
  88.     nothing.
  89.     
  90.     returns:
  91.     String    = Command line tail is copied to this string. Redirection
  92.               data is filtered by DOS. The command should be called
  93.           immediateley after program startup. This will insure that
  94.           disk writes don't overwrite the command line data.
  95.           The String variable is null terminated, when returned.
  96.  
  97.  
  98.     GETDOS - Get the version of MS-DOS
  99.    
  100.     integer*2 Major,Minor
  101.     call GetDOS(Major,Minor)
  102.     
  103.     call with:
  104.     nothing.
  105.     
  106.     returns:
  107.     Major    = Primary version number 1,2,or 3
  108.     Minor    = Sub version number 0,10,20,21,3
  109.     
  110.     example: Major=3, Minor =21 yields 3.21
  111.  
  112.  
  113.     BEEP - Beep the speaker.
  114.  
  115.     call Beep()   
  116.  
  117.  
  118.     GETPSP - Get the segment address of the current programs PSP.
  119.             This function only works in DOS 3.0 or above. If called
  120.         from a lesser version it returns a zero value.
  121.         
  122.     integer*2 Segment
  123.     call GetPSP(Segment)
  124.     
  125.      call with:
  126.      nothing
  127.      
  128.      returns:
  129.      Segment - The segment address of the PSP 
  130.  
  131.     FAT-DOS 1.0            SETNUL            PAGE G-2
  132.  
  133.  
  134.  
  135.     SETNUL - Replaces a '`' with a char(0) in a character string.
  136.            This is useful in versions of Fortran that won't allow the 
  137.         following. String = 'MyString'//char(0).
  138.         
  139.     character*n String
  140.     call SetNul(String)
  141.     
  142.     call with:
  143.     String    = character string with '`', to be replaced by a 
  144.               char(0) value.
  145.           
  146.     returns:
  147.     String    = character string with the '`' replaced by a zero value.
  148.  
  149.     example: String = 'MyString`'
  150.              call SetNul(String) 
  151.     FAT-DOS 1.0            GETTIM            PAGE H-1
  152.  
  153.  
  154.     GETTIM - Get the system time, in Hours,Minutes, Seconds and 
  155.         Hundredths of a second.
  156.    
  157.     integer*2 Hrs,Min,Sec,Hsec
  158.         call GetTim(Hrs,Min,Sec,Hsec)
  159.     
  160.     call with:
  161.     nothing.
  162.     
  163.     returns:
  164.     Hrs    = Hours , 0-23
  165.     Min    = Minutes,0-59
  166.     Sec    = Seconds, 0-59
  167.     Hsec    = Hundredths of Seconds,0-99
  168.  
  169.  
  170.  
  171.     SETTIM - Set the system time, in Hours,Minutes, Seconds and
  172.          Hundredths of a second. To permanently reset the hardware 
  173.         clock of many  systems, you must use the SETUP program supplied 
  174.             with your  computer system.
  175.    
  176.     integer*2 Hrs,Min,Sec,Hsec
  177.         call SetTim(Hrs,Min,Sec,Hsec)
  178.     
  179.     call with:
  180.     Hrs    = Hours , 0-23
  181.     Min    = Minutes,0-59
  182.     Sec    = Seconds, 0-59
  183.     Hsec    = Hundredths of Seconds,0-99
  184.  
  185.     returns:
  186.     nothing.
  187.  
  188.  
  189.  
  190.     GETDAT - Gets the system date, in year, month and day format.
  191.    
  192.     integer*2 Yr,Mo,Day
  193.     call GetDat(Yr,Mo,Day)
  194.     
  195.     call with:
  196.     nothing.
  197.     
  198.     returns:
  199.     Yr    = Year, 1980 - 2099
  200.     Mo    = Month, 1 - 12 
  201.     Day    = Day, 1 - 31
  202.  
  203.     FAT-DOS 1.0            SETDAT            PAGE H-2
  204.  
  205.  
  206.  
  207.     SETDAT - Sets the system date, in year, month and day format.
  208.    
  209.     integer*2 Yr,Mo,Day
  210.     call SetDat(Yr,Mo,Day)
  211.     
  212.     call with:
  213.     Yr    = Year, 1980 - 2099
  214.     Mo    = Month, 1 - 12 
  215.     Day    = Day, 1 - 31
  216.  
  217.     returns:
  218.     nothing.
  219.     FAT-DOS 1.0            AUXINP            PAGE I-1
  220.  
  221.  
  222.  
  223.     AUXINP - Read a character from the Aux port. Also know as the 
  224.             serial port.
  225.  
  226.     integer*2 Key
  227.         call AuxInp(Key)
  228.     
  229.     call with:
  230.     nothing.
  231.     
  232.     returns:
  233.     Key    = character from Aux port is returned in the low byte.
  234.  
  235.  
  236.  
  237.     AUXOUT - Send a byte to the Aux port. Also known as the serial port.
  238.    
  239.     integer*2 Key
  240.     call AuxOut(Key)
  241.     
  242.     call with:
  243.     Key    = byte value to send to the Aux port.
  244.     
  245.         returns:   
  246.     nothing.
  247.  
  248.  
  249.  
  250.     PRNOUT - Send a byte to the prn(printer) or LPT1.
  251.  
  252.     integer*2   Key
  253.     call PrnOut(Key)
  254.     
  255.     call with:
  256.     Key    = Byte value to send to the printer.
  257.     
  258.     returns:
  259.     nothing.
  260.    
  261.     FAT-DOS 1.0            INPB            PAGE I-2
  262.  
  263.  
  264.     INPB - Input a byte from a port.
  265.     
  266.     integer*2 Port,Value
  267.     call InpB(Port,Value)
  268.     
  269.     call with:
  270.     Port    = Port number to receive input from.
  271.     
  272.     returns:
  273.     Value    = Byte returned at Port.
  274.  
  275.     INPW - Input a word from a port.
  276.     
  277.     integer*2 Port,Value
  278.     call InpW(Port,Value)
  279.     
  280.     call with:
  281.     Port    = Port number to receive input from.
  282.     
  283.     returns:
  284.     Value    = Word returned at Port.
  285.  
  286.  
  287.  
  288.     OutpB - Ouput a byte to a Port.
  289.    
  290.     integer*2 Port,Value
  291.     call OutpB(Port,Value)
  292.     
  293.     call with:
  294.     Port    = Port number to ouput the value to.
  295.     Value    = Byte value to send to the Port.
  296.  
  297.     returns: nothing
  298.  
  299.  
  300.  
  301.     OutpW - Ouput a word to a Port.
  302.    
  303.     integer*2 Port,Value
  304.     call OutpW(Port,Value)
  305.     
  306.     call with:
  307.     Port    = Port number to ouput the value to.
  308.     Value    = Word value to send to the Port.
  309.  
  310.     returns: nothing.
  311.  
  312.     FAT-DOS 1.0            GETCBF            PAGE J-1
  313.  
  314.  
  315.     GETCBF - Get the status of extended control-break checking. When
  316.             Ctrl-Break checking is on, disk I/O may be abruptly 
  317.         terminated. When extended Ctrl-Break checking is off
  318.         disk I/O is unaffected during a write or read, if a 
  319.         Ctrl-Break is pressed. This is true of both a Ctrl-Break 
  320.         and a Ctrl-C press.
  321.    
  322.     integer*2 Flag
  323.     call GetCBF(Flag)
  324.     
  325.     call with:
  326.     nothing.
  327.     
  328.     returns:
  329.     Flag    = 0 Extended Ctrl-Break checking off.
  330.                   1 Extended Ctrl-Break checking on.
  331.             
  332.  
  333.     SETCBF - Set the status of extended control-break checking. 
  334.             When Ctrl-Break checking is on, disk I/O may be abruptly 
  335.         terminated. When Ctrl-Break checking is off, disk I/O
  336.         is unaffected during a write or read. This is true of
  337.         both a Ctrl-Break and a Ctrl-C press.
  338.    
  339.     integer*2 Flag
  340.     call GetCBF(Flag)
  341.     
  342.     call with:
  343.     Flag    = 0 Turn OFF Extended Ctrl-Break checking.
  344.                   1 Turn ON Extended Ctrl-Break checking.
  345.  
  346.         returns:
  347.     nothing.            
  348.     FAT-DOS 1.0            TRAPCC            PAGE J-2
  349.  
  350.  
  351.  
  352.     TRAPCC - Trap all Ctrl-C presses to prevent a user from terminating
  353.             a program from a Ctrl-C key-press. This subroutine reroutes the
  354.         INT1b interupt away from MS-DOS. When the program is ended
  355.         MS-DOS takes over the INT1b interupt again.
  356.           Whenever a Ctrl-C is pressed Flag is set to -1. If you just
  357.         want Ctrl-C disabled, ignore the value of Flag. If you want
  358.         to know i